﻿using Idte.Common.ArtifactModel;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Idte.HumanResource.Competency
{
    public class ModelCluster : IDimension
    {
        [ForeignKey("ModelId")]
        public CompetencyModel Model { get; set; }
        [Key, Column(Order=0)]
        public Guid ModelId { get; set; }
        [ForeignKey("ClusterId")]
        public Cluster Cluster { get; set; }
        [Key, Column(Order=1)]
        public Guid ClusterId { get; set; }

        public ICollection<IValueDescriptor> Values
        {
            get
            {
                return Cluster.Values;
            }
            set
            {
                Cluster.Values = value;
            }
        }
    }
}
